package com.ys.servers.common.mq;

import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;

import java.util.function.BiConsumer;
import java.util.function.Consumer;
//import com.ys.common.socket.SocketData;

/**
 * Created by taotao on 2017/2/23.
 */
public interface EventMQ {

    public static EventMQ getApiEventMQ(Vertx vertx) {
        return new EventBusImpl(vertx);
    }

    public static EventMQ getInterEventMQ(Vertx vertx) {
        return new EventBusImpl(vertx);
    }

    public void send(String address,InternalEventData internalEventData, Consumer<InternalEventData> replyHandler);

    public void consumer(String address, BiConsumer<InternalEventData, Future<InternalEventData>> replyHandler);
}
